﻿
using FacebookXmpp.Parse;

namespace FacebookXmpp.Stanzas
{
	internal class MessageSend : Stanza
	{
		public MessageSend(Person person, string text)
		{
			NextResponse = string.Format(
				@"<message id='{0}' to='{1}' type='chat'><body>{2}</body><thread>{3}</thread></message>",
				NextId, person.Id, text, person.Thread );
		}

        public override string MessageToService()
        {
			Stream.RemoveHandler( this );
            return NextResponse;
        }

        public override void ProcessResponse(MessageData recieved)
		{            
		}
	}
}
